package com.example.alee.mybatis.springmybatis.provider;

public class SqlProvider {

    public static String selectArticle() {
        return "select * from article where id=#{id}";
    }

    public static String updateArticleTime() {
        return "update article set update_time=#{newTime} where id=#{id}";
    }


    public static String insertArticle() {
        return """
                   INSERT INTO article (user_id, title, summary, read_count, create_time, update_time) 
                   VALUES 
                   (#{user_id},#{title},#{summary},#{read_count},#{create_time},#{update_time})
                """;
    }


    public static String deleteArticleById() {
        return "DELETE from  article where  id = #{id}";
    }


}
